import gym
import random
import numpy as np
import time

env = gym.make("LunarLander-v2", render_mode="human")
env.action_space.seed(50)
observation, info = env.reset(seed=50)

for _ in range(1000):
    observation, reward, terminated, truncated, info = env.step(env.action_space.sample())

    # 完成任务 或 失败
    if terminated or truncated:
        observation, info = env.reset()

env.close()